package com.zl.rbac.web.controller;

import com.zl.rbac.util.RequiredPermission;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 测试的
 * @ClassName: TestController
 * @author: suke
 * @since: 2021/1/11 11:33
 *
 *   权限的表达式:  包名.类名:方法名
 */
@Controller
@RequestMapping("test")
public class TestController {


    @GetMapping("test1")
    @ResponseBody
    @RequiredPermission("测试1")
    public  String  test1(){
        return "test1";
    }

    @GetMapping("test2")
    @ResponseBody
    @RequiredPermission("测试2")
    public  String  test2(){
        return "test2";
    }

    @GetMapping("test3")
    @ResponseBody
    public  String  test3(){
        return "test3";
    }
}
